import 'dart:async';
import 'dart:convert';

import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shop/config/config.dart';
import 'package:shop/http/HttpUtil.dart';
import 'package:shop/route/my_route.dart';
import 'package:url_launcher/url_launcher.dart';
class GaiMima extends StatefulWidget {
  GaiMima({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _GaiMima createState() => _GaiMima();
}

class _GaiMima extends State<GaiMima> {


  @override
  void initState() {
    super.initState();

  }


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text("地图测试"),
      ),
      body: Center(
        child: RaisedButton(
          child: Text("打开地图app"),
          onPressed: () async{
            await launch("baidumap://map"); // 打开手机端百度地图app
          },
        ),
      ),
    );
  }


}